

package com.walk.zworld.ui.activity

import androidx.fragment.app.Fragment
import com.walk.zworld.ui.fragment.square.CommendFragment
import com.walk.zworld.ui.fragment.square.DailyFragment
import com.walk.zworld.ui.fragment.square.DiscoveryFragment
import com.base.lib.base.model.TabEntity
import com.base.lib.base.view.BaseMvvmPageActivity

/**
 * 首页主界面。
 * @since  2020/4/30
 */
class SquarePageActivity : BaseMvvmPageActivity() {


    companion object {
        fun newsInstance() = SquarePageActivity()
    }

    override val createTitles = ArrayList<TabEntity>().apply {
        add(TabEntity("发现"))
        add(TabEntity("推荐"))
        add(TabEntity("日报"))
    }

    override val createFragments: Array<Fragment> = arrayOf(DiscoveryFragment.newsInstance(), CommendFragment.newInstance(), DailyFragment.newsInstance())

    override fun initView() {
        viewPager?.currentItem = 1
    }
    override fun initData() {
    }
}
